<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>游客信息修改</title>
</head>
<h1>修改游客信息</h1>
<body>
	<form action="TouristServlet?method=touristUpdateSave" method="post">
	<input type="hidden" name="id" value="${param.id }"/>
		<table>
			<tr>
				<td>游客姓名</td>
				<td><input type="text" id="name" name="name" required="required" value="${tourist.name }"></td>
			</tr>
			<tr>
				<td>性别</td>
				<td><input type="radio" id="sex" name="sex" value="男" ${tourist.sex eq "男" ? "checked='checked'" : '' }>男
					<input type="radio" id="sex" name="sex" value="女" ${tourist.sex eq "女" ? "checked='checked'" : '' }>女</td>
			</tr>
			<tr>
				<td>年龄</td>
				<td><input type="number" id="age" name="age" min="1" max="99" onchange="checkAge();" value="${tourist.age }"></td>
			</tr>
			<tr>
				<td>身份证号码</td>
				<td><input type="text" id="id_number" name="id_number" Maxlength="18" required="required" value="${tourist.id_number }"></td>
			</tr>
			<tr>
				<td>手机号码</td>
				<td><input type="text" id="phone_number" name="phone_number" Maxlength="11" value="${tourist.phone_number }"></td>
			</tr>
		</table>
		<input type="submit" id="submit" name="submit" value="提交">
		<input type = "button" onclick="history.back();" value = "返回" />
	</form>
</body>
</html>